Method and apparatus for feature-based quantization and compression of data

ABSTRACT

A method and apparatus for compression and restoration of images, videos, surfaces, curves and, generally, pixel-based data sets, including: feature-based quantization using a set of N isocontours; compressing each of these N contours using a level set-based compression of curves or surfaces—and/or combining the quantization with a conventional method for compression of surfaces; and decompressing the compressed data using a nonoscillatory reconstruction. The method is naturally multiscale, but does not use wavelets or other multiscale-basis functions. The method performs compression and decompression (1) without excessive computational complexity, even in the presence of topological changes such as merging or breaking of isocontours as the scale changes, (2) with excellent image fidelity, (3) without unacceptable artifacts such as ringing, blurring, or blocking, (4) with simple and natural grid based ways of calculating geometric features such as normals, principal curvatures.

[0001] This patent application claims priority to United States Provisional Patent Application No. 60/172,542 of Osher, et al. filed Dec. 17, 1999, entitled “Feature Based Quantization, Compression of Curves and Surfaces Using a Level Set Technique, Compression and Decompression of Images and Videos Using Feature Based Quantization and Level Set Based Compression of Curves and Surfaces”, which is incorporated herein by reference.

[0002] The present invention relates to a method for quantization, compression and retrieval and decompression of digital images, videos, and other, pixel-based data. The objective is to preserve desirable features and fidelity for lossy high compression ratios using geometric/feature-based quantization, compressing the resulting isocontours and retrieving/decompressing without introducing spurious artifacts.

BACKGROUND OF THE INVENTION

[0003] A fundamental goal of compression is to reduce the amount of data necessary to represent the original object, while maintaining fidelity and important features. Examples of important applications include: data transmission, data storage and data retrieval.

[0004] Many existing methods are of limited use because they cannot achieve a high compression ratio with good image fidelity, or because they do not have tractable computational complexity. For many methods high compression ratios may introduce unacceptable artifacts such as: ringing, blurring or blocking. Compression of curves or surfaces using standard methods such as NURBS (for “non-uniform rational B-splines”; see, e.g., Rogers, D. F., An Introduction to NURBS: with Historical Perspective, Morgan-Kaufmann (2000), which is incorporated herein by reference) becomes difficult if the curves or surfaces are deformed (even slightly) so as to change topology. This may occur, for instance, if the viewing resolution is changed. Moreover, standard curve or surface compression methods do not allow for computational ease in computing geometric properties of the curve or surface, e.g., normals and curvatures.

[0005] Standard quantization techniques do not take into account geometrical properties of the features, e.g., edges, textures. For example, a widely used standard quantization method divides the intensity range into equal integer values and blindly converts the intensity values to the nearest integers. Another popular method equalizes the area histogram. These methods often lead to loss of important features.

Summary of the Invention

[0006] In accordance with the present invention, a method is provided for a feature-based quantization system that generates a compressed version of the original data. One advantage is that the method of the invention preserves desirable features such as local total variation, curvatures, arc length, surface area or whatever is viewed as important by the user as much as possible after compression.

[0007] The inventive method compresses curves or surfaces in a way that can handle topological changes such as merging and breaking, and easily evaluates the geometrical quantities of the compressed curves or surfaces, in an efficient multiresolution fashion.

[0008] In addition, a the method of the invention merges the quantization and curve or surface compression methods into a simple and general compression of pixel-based data, retaining the advantages of both the new quantization and curve/surface compression, insofar as the curve/surface compression method is applied to the isocontours of the original data set, selected by the quantization algorithm.

[0009] The method of the invention also retrieves and decompresses the compressed data via an artifact-free, nonoscillatory reconstruction.

[0010] A preferred embodiment of the invention includes: (1) a feature-based quantization method to quantize the image, video or general pixel based data set, obtaining N isocontours which we shall denote as being curves/surfaces, although their dimension is arbitrary, one less than that of the original data set; (2) a compression method for curves/surfaces using a level set based method (although, in a less preferred embodiment, other methods could be used to compress the surface); and (3) reconstruction of the data set using essentially nonoscillatory (ENO) reconstruction (including piecewise linear reconstruction) from the compressed isocontours using the distance function between isocontours, or alternatively, inverting numerically a partial differential equation, such as Laplace's equation, with the known constant data given on the isocontours. (For a discussion of ENO reconstruction, see Harten, A., Osher, S. J., Engquist, B. E. and Chakravarthy, S. R., Some Results on Uniformly High-Order Accurate Essentially Nonoscillatory Schemes, Journal of Applied Numerical Mathematics, Vol. 2, pp. 347-377, which is incorporated herein by reference.)

[0011] The compression of a digital (pixel based) data set is achieved by first performing a feature-based quantization. Examples of geometrical quantities that can be used include: (1) area, (2) total variation, (TV), (3) surface area, (4) curvature of isosurfaces, or (5) combinations thereof. Data quantization refers to converting the data values, which may be numerous, into a certain smaller set of values. The choice of these values strongly affects the quality of the resulting quantized data set. Geometric quantities are (easily) computed and used here to define measures that can characterize the importance of the features. A histogram of the original data set is constructed according to the chosen measure The histogram is divided evenly into N bins, where the positive integer N is determined by the desired resolution or compression rate of the quantized data. Then, the N most significant set of values, which are the centers of the equal histogram bins in the chosen measure, are selected as the final quantized values, and real image values are converted to them. Values are thus concentrated near features and each intensity value in the quantized data set has equal area with respect to the chosen measure. The quantization method can be used as a preprocessing technique for other, standard digital data compressions. It may also be combined with standard data compression in its quantization step. Since this quantization method is data dependent, in order to obtain reconstruction later, the N centers of the quantization bins have to be stored, e.g., each as a header of the quantized image. The geometric properties of these isocontours can also be stored and can be used for data retrieval. Each bin can be identified with the two level contours of the data that bound all the intensity values in the bin from above and below.

[0012] Curve/surface compression is designed to reduce the amount of data needed to represent the original object, while maintaining geometric fidelity. Black-white or binary data sets can be included as collections of isocontours and thus such curve/surface compression applies to such data. In this invention a level set technique is used to construct a multilevel representation of the curve/surface. On level set techniques, see Osher, S. and Fedkiw, R. P., Level Set Methods: An Overview and Some Recent Results, UCLA CAM Report 00-08 (February 2000), which is incorporated herein by reference.

[0013] The number of levels decreases with the compression rate. First, the curve/surface is defined as a level contour (preferably, the zero-level contour) of a smooth (Lipschitz continuous) function, i.e. the level set function. Then a piecewise polynomial approximation of the curve/surface with the aid of this smooth function based on multilevel nonuniform grids is constructed. A dyadic decomposition of the multidimensional rectangular domain is used, and a given error tolerance is enforced as a stopping criterion for recurrent division. This yields a multiresolution representation of the level set function as well as of its level sets, one of which is the compressed version of the original curve/surface. The reduced number of data points and level set values at these points are encoded using standard techniques such as Huffman coding.

[0014] The decompression (data retrieval) of the compressed data set is now done using some nonoscillatory reconstruction such as (1) piecewise linear or ENO interpolation using the distance function between the compressed isocontours, or (2) inverting numerically a partial differential equation, e.g., Laplace's equation, with the data given on the N isocontours.

[0015] Variations and generalizations of embodiments of the invention will be apparent in the course of the description below. Generally, a method according to the invention quantizes an image, video or general data set defined by pixel values. This is a feature-based quantization, where geometric quantities such as area, curvature, local total variation, arclength or surface area of isocontours (or more generally, contours), are used to define a measure. A histogram of the data is constructed and divided into (preferably equal) bins according to the measure. The number of these bins may be determined by the compression rate selected by the user of the computer-based system.

[0016] Centers of the equal histogram bins are preferably selected as the most significant set of values for quantization, and the input data in each histogram bin is converted to these corresponding values, which are isocontours of the quantized image. These N quantities can be stored as a header of the quantized image. The geometric properties of these contours can also be stored, and can be used for retrieval. Each bin can be identified with two isocontours of the data, which bound all intensity values in the bin from above and below.

[0017] A level set-based technique using a grid is preferably used for the compression of curves and surfaces (hereinafter, where either term “curve” or “surface” is used, the other may alternatively be used), where the curve or surface is first represented as the zero-level set of a real valued function, such as signed distance to the curve or surface. This function is defined at grid locations.

[0018] In addition, a multiresolution representation of the curve or surface using a dyadic division of the multidimensional rectangular domain is preferably generated, until a desired (e.g. user-defined or automatically generated) level of accuracy is achieved. An approximation of the zero-level contour, i.e., the original curve or surface in each subdivided box, is in a preferred embodiment based on an interpolant of the scalar function.

[0019] The information stored is preferably an encoded version (using, for example, Huffman coding), of the values of the approximating level set function at the nodes characterizing the multiresolution dyadic decomposition from which a piecewise smooth (for example, linear) interpolant yields the approximating level set function. Combining the foregoing method features provides feature-based compression for images, videos, and other general data sets.

[0020] In preferred embodiments, isocontours of the data set can be selected whose values equally divide the histogram according to the feature-based measure.

[0021] The (iso-)curves or (iso-)surfaces may be further compressed in accordance with the compression methods of the invention, effectively further compressing the original data set.

[0022] A decompression and reconstruction method of the invention uses the decompressed curves, which are isocontours of the approximating level set functions, together with their constant values on each isocontour via linear or other essentially nonoscillatory reconstruction or interpolation, or other partial differential-based numerical method, such as solving Laplace's equation approximately with the constant values given on isocontours.

BRIEF DESCRIPTION OF THE DRAWINGS

[0023]FIG. 1 is a flow chart of a quantization method of the invention.

[0024] FIGS. 2-4 are diagrams illustrating aspects of data quantization procedures according to the invention.

[0025]FIG. 5 is a flow chart of a compression method of the invention.

[0026] FIGS. 6-14 show curve subdivisions representing curve compression procedures according to the invention.

[0027]FIG. 15 is a block diagram depicting hardware implementing a preferred embodiment of the invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0028] The following discussion is a general description of the subject matter of the present invention. This appeared in the text of the Provisional Patent Application upon which the present application is based, and it is in turn followed by a more specific description of preferred embodiments of the invention.

[0029] It will be appreciated that the methods of the invention can be implemented in conventional processor-based systems, and stored on conventional media, such as on disk or tape, or in volatile or non-volatile memory. Thus, the present inventive methods may be implemented in standard computer hardware or software, or a combination of both. In particular, the methods (such as those represented by the flow charts of FIGS. 1 and 5), or any steps thereof, can be implemented as software programs or program modules, applets or the like for storage, compilation and running on conventional computer systems, and alternatively may be implemented in whole or in part as firmware or hardware circuits or chips that carry out the method steps. The term “module” as used herein may thus refer to such hardware, firmware and/or software, alone or in combination as suitable, to carry out a given method step as described.

[0030] The various data, quantities, etc. discussed below may be stored in conventional media and/or hardware, and any necessary calculations, manipulation of information, images or the like can thus be carried out by computer systems as discussed above.

[0031] A feature (geometrically) based quantization system applied to input data such as image data is used to generate a compressed version of the original data. Geometric quantities are used to define a measure that can characterize the importance of the features. Then the most significant finite set of values is selected, which are the centers of equal histogram bins in these measures. The input data is converted to this smaller set of data.

[0032] Standard curve and surface compression algorithms involve representing the curve or surface using basis functions such as NURBS, and compress the representation. A level set based technique using a grid in order to compress curves or surfaces is introduced here. This has advantages over the standard techniques as follows. First, the compression can gracefully handle topological changes such as breaking or merging, which occur, e.g. as the scale is changed, or if the curve or a surface is slightly deformed. Second, geometric quantities defined on the compressed surface or curve can be easily evaluated by this implicit, grid-based technique. Third, the technique has a multiresolution representation, which makes it unique among implicit curve and surface representations and compression algorithms. Feature-based quantization is used to select N contour curves (for images) or surfaces (for videos), or for more general data sets.

[0033] These curves are next compressed using level set based compression of curves and surfaces. An alternative is to use another method to compress these curves. The image or video is decompressed using a nonoscillatory interpolation of the set of N constant data which is given on the N contours. The method gives an artifact free, feature-based compression and decompression.

[0034] A fundamental goal of compression is to reduce the amount of data necessary to represent the original object while maintaining acceptable fidelity. Examples of important applications include data transmission, data storage and data retrieval.

[0035] Many of the existing methods are not useful because they cannot achieve a high compression ratio with good image fidelity or because they do not have tractable computational complexity. For many methods, high compression ratios may introduce unacceptable artifacts such as ringing, blurring or blocking.

[0036] The quantization described here is feature-oriented, i.e., based on the geometry of the data, such as size of shapes and intensity values. In general, the data features, which usually can be characterized mathematically by geometric quantities are important and interesting. For instance, it is very important to retain the sharp boundaries of objects when an image is compressed. Most of the existing compression methods produce fuzzy boundaries i.e. edge effects, especially for high compression ratios. We first list some important geometric quantities and use them in our feature-based quantization.

[0037] We use the following geometric terms to characterize the features of the data:

[0038] (i) Area: This represents the size of features with a certain intensity level

[0039] (ii) Total Variation (TV): This represents the total amount that the data varies.

[0040] (iii) Arclength of curves or area of surfaces

[0041] (iv) Curvature of level curves or surfaces of the data

[0042] Image quantization refers to converting the real data values, which could be thought of as having an infinite or a very large number of possible values, to a certain finite and smaller set of values. The choice of these values strongly affects the quality of the resulting image.

[0043] In most of the standard quantization methods, the geometric properties of the features are not taken into consideration. For example, the standard scalar quantization method divides the intensity range into equal integer values and blindly converts the intensity values to the nearest integers. This usually leads to the loss of important features in the quantized images.

[0044] An important advantage of feature-based quantization according to the present invention is the retention of the most significant and important features in the quantized data (e.g., in images) by selecting the smaller set of values so as to preserve features. The way we accomplish it is to use the above introduced geometric quantities to define measures which can characterize the importance of the features, then select the most significant finite set of values, which are the centers of the equal histogram bins in these measures, and convert the real image values to them. Values are concentrated near features. We now use the following two examples to illustrate our approach.

[0045] The first example we show here is based on the area features. We define a measure by:

M _(area)(x)=Area{u:u is less than or equal to x}.

[0046] Suppose N is a given integer, which is the number of intensity values we can have in the quantized images. How do we select the N values? We choose these N values in a way such that all intensity values in the quantized image have equal area. More precisely, we equally partition the area into N bins, then select the centers of these N bins as our target quantized intensity values.

[0047] The implementation can be carried out as follows: these N numbers can be easily computed by a histogram equalization in the measure of area.

[0048] This area histogram equalization approach has been used in some quantization methods in the past, e.g. as described in Sapiro, G. and Caselles, V., Histogram Modification via Differential Equations, Journal of Differential Equations, Vol. 135, No. 2, pp. 238-268 (1997) (this Vol. 135, No. 2 is incorporated herein by reference). For instance, most statistical quantization methods based on the probability distribution can be interpreted in this way. In fact, if we normalize the measure M_(area)(x) by the total area, i.e. use M_(area)(x)/(total area) as the measure, we have the probability distribution of the intensity value x. Therefore, the histogram equalization in the probability space is the same as the histogram equalization in the measure M_(area)(x).

[0049] One disadvantage of this measure is that it may not be able to capture the features with large contrast variance, which the human visual system recognizes. This includes for example, objects with high variance in intensity but having a small area. In order to capture the high variance features as well as the large area features, we introduce a better measure defined by:

M _(TV)(x)=α(number of u _(ij))+sum TV(u _(ij)) for u _(ij) <x,

[0050] where α is a positive parameter used to balance the importance of the two different kinds of features: features with large area and features with high contrast variance.

[0051] As in the previous example, we can equally partition the intensity values into N bins in this measure M_(TV)(x), then select the centers of these bins as our target quantized intensity values.

[0052] In implementation, we just need to compute the variation at each pixel and add it to α times its area, which is one for each individual pixel. Then, we find the histogram equalization of this measure, and select the centers of the histogram bins as the N values.

[0053] The variation at each pixel is defined to be the gradient or an approximation to the gradient. In two-dimensional arrays u_(ij), i, j taking on discrete values, we may take other approximations to the variation such as $\sqrt{\left( {u_{i,j} - u_{{i - 1},j}} \right)^{2} + \left( {u_{i,j} - u_{i,{j - 1}}} \right)^{2}},\sqrt{\left( \frac{u_{{i + 1},j} - u_{{i - 1},j}}{2} \right)^{2} + \left( \frac{u_{i,{j + 1}} - u_{i,{j - 1}}}{2} \right)^{2}},{{{u_{{i + 1},j} - u_{ij}}} + {{u_{i,{j + 1}} - u_{ij}}}},$

[0054] etc., might be used. In general, representations of or approximations to the variations of the curve (or surface, etc.) at the given point(s) or region(s) will be suitable.

[0055] Characteristics of this quantization method include the following:

[0056] (a) This general quantization approach can also use other measures, including, for example, approximations to the curvature of the level contours of the data, for the histogram equalization.

[0057] (b) This quantization method can be used as a preprocessing technique for standard image compression. It can also be combined with standard image compression processing in its quantization step.

[0058] (c) The geometric quantities are local and easy to compute, as we showed above for the variation.

[0059] (d) These techniques can be used for quantization, compression and retrieval of higher dimensional data.

[0060] Since this quantization method is data dependent, in order to get perfect reconstruction, the N centers of the equalization bins have to be stored. For instance, these N quantities can be stored as a header of the quantized image. The geometric properties of these contours can also be stored and can be used for retrieval.

[0061] Each bin can be identified with the two level contours of the data that bound all the intensity values in the bin from above and below.

[0062] A fundamental goal of surface and curve compression is to reduce the amount of data necessary to represent the original object, while maintaining image fidelity. Black-white, or binary images can be identified as collections of curves, so curve compression applies to such images. Examples of important applications include transmission, storage and retrieval.

[0063] Standard existing algorithms have difficulties with breaking, merging or any other topological changes that occur when the data is perturbed, and with extracting accurate geometric information such as curvatures, normals, etc. Standard implicit algorithms do not have a simple multiresolution representation.

[0064] Suppose we are given a curve in R² (for surfaces in R³, the algorithm can be similarly constructed); our goal is to compress this curve. We will use level set techniques to construct a multiresolution representation of the curve. Thus, we can use the coarse level representation as the compressed version of the curve. The idea is to embed the curve as a level contour (usually the zero-level contour) of a smooth function, then use a piecewise polynomial approximation of this smooth function based on multi-level non-uniform grids, therefore we approximate the curve as the zero-level set of this compressed function.

[0065] The method includes the following three steps:

[0066] Step 1: Represent the curve as the zero-level contour of a smooth function such as the signed distance function. We can achieve this by using level set distance reinitialization or interpolation.

[0067] Step 2: Compute the multiresolution representation of the smooth function, therefore the multiresolution representation of the curve. We start with the initial rectangular (box), form the piecewise polynomial approximation based on the comer values, and measure the symmetric difference (the area of places where the smooth function and its approximation have different sign). If the symmetric difference is less than a given tolerance, stop the process. Otherwise, divide the box into four equal partitions and repeat the above approximation procedure for each sub-box. We terminate this process when the stopping criterion is satisfied in every box. In this step, we build up a multiresolution representation of the smooth function as well as the curve.

[0068] Step 3: Code the multiresolution representation by standard coding techniques, such as Huffman coding, which is described in Vitter, J. S., Design and Analysis of Dynamic Huffman Codes, Journ. ACM (Association of Computer Machinery), Vol. 34, No. 4, pp. 825-845 (October 1987) (Vol. 34, No. 4 being incorporated herein by reference).

[0069] This compression technique has certain advantages over the standard curve compression methods such as tracking. First, this compression can easily handle topological changes in the curves such as merging and, breaking while other methods usually have difficulties with this. Second, it is much easier for this method to evaluate the geometry of the curves, since the smooth function whose zero-level set defines the curve is known explicitly on a grid. We can thus compute numerical approximations to its derivatives on this grid, evaluate them on the zero-level set, and thus compute the geometry of the curve. Third, it has a multiresolution representation.

[0070] The method goes over immediately to three dimensions, except that we recursively divide the original rectangular parallelepiped into eight equal rectangular parallelepipeds. Then we divide each of these eight into polyhedra and use polynomial interpolation in each polyhedron, in a fashion similar to that used in the marching cubes algorithm. See Lorenson, W. E. and Cline, H. E., Marching Cubes, A High-Resolution 3D Surface Construction Algorithm, Computer Graphics (Proceedings of SIGGRAPH 87, Vol. 21, No. 4, pp. 163-169 (1987)) (Vol. 21, No. 4 being incorporated herein by reference). The rest of the above statements go over word for word from two to three dimensions.

[0071] We combine the feature-based quantization technique and the curve or surface level set based compression to compress and decompress images (for curves) or videos for (surfaces). The procedure is as follows:

[0072] Step 1: Use the feature-based quantization method to quantize the image or video. We obtain N contours, which are curves (for images) or surfaces (for videos).

[0073] Step 2: Compress these N contours using the level set based compression of curves or surfaces. We may use other methods to compress the level contours. If we have a good approximation to the contours we can reconstruct the features in the image, keeping edges and features sharp.

[0074] Step 3: Reconstruct the image or video using a nonoscillatory reconstruction. Several techniques are available for this. One technique is just piecewise linear interpolation using the distance function between the contours. Higher order accurate essentially nonoscillatory interpolation is also possible. Another technique is to solve a discrete approximation to Laplace's equation with the data given on the N contours.

[0075] Feature-Based Quantization

[0076] An advantage of the feature-based quantization of the invention is the retention of the most significant and important features in the quantized data (e.g. in images) by selecting a smaller set of values so as to preserve features.

[0077] The feature-based quantization may be understood by reference to the flow chart of FIG. 1 of the drawings, and to the pseudocode attached hereto as Appendix A.

[0078] In the following discussion, these definitions will be used:

[0079] u=data set to be quantized

[0080] u[i][j]=value of the data at the pixel or point (ij)

[0081] u_min=minimum value of u[i][j]

[0082] u_max=maximum value of u[i][j]

[0083] α=positive parameter used to balance 2 kinds of features: large area and high contrast variance.

[0084] N=number of data values in the quantized set

[0085] TV=total variation, i.e. the total amount the data varies. For u, this can be calculated by approximating the norm of the gradient of u.

[0086] S=bin size of the histogram

[0087] An important measure M_TV(x) is defined by:

M _(—) TV(x)=α(number of u[i][j])+sum TV(u[i][j]) for u[i][j]<=x

[0088] The N values are selected in the following manner. M_TV is used to equally partition u[i][j] into N histogram bins. Note that M_TV(x) is a monotonically increasing sequence, so its values from x=u_min to x=u_max can be placed in increasing order. For illustration, consider a number line as in FIG. 2. In this case, the last value M_TV(u_max) can be divided by (N−1) to get the bin size (denoted by S):

S=M _(—) TV(u_max)/( N−1)

[0089] Preferably, the bins are partitioned, as represented in FIG. 3, so that the first and last bins are of size S/2 and all other bins are of size S (though other partitioning schemes are possible). In FIG. 3, M_TV(u_min) corresponds to d₀=u_min, and M_TV(u_max) corresponds to d_(N)=u_max. Thus, there are N bins altogether. Associated with each bin are endpoints corresponding to M_TV(x) values. The associated x values of these endpoints are stored, and may be referred to as the dividing points d(i).

[0090] These dividing points determine the quantized values. The first and last values, d(0) and d(N), are kept as quantized values. The remaining quantized values are the midpoints of the intervals defined by the interior dividing points, d(1), d(2), d(3), . . . , d(N−1). An example of one such bin interior is represented in FIG. 4.

[0091] It will be appreciated that the above-described method results in data quantization that is not simply based upon equal-area or equal-length divisions of an image, as with prior systems; rather, it efficiently quantizes such images based upon variations in the features of the images themselves. This can greatly reduce the amount of information needed to store the compressed image (e.g. by a factor of five or more), and at the same time can achieve a more accurate representation of an image for a given amount of data compression.

[0092] Curve Compression

[0093] A preferred embodiment of the curve compression method of the invention is represented in the flow chart of FIG. 5. An implementation of the method may be embodied in software or hardware, and in particular may be made by reference to the pseudocode included in Appendix B of this application.

[0094] Generally, given a curve C0 in multidimensional space (see FIG. 6 for a simple example), one can represent it as the zero contour of a signed distance function (level set function) φ. For a generalized curve C,

C={x:φ(x)=0}

[0095] The resulting level set function may be represented as a set of curves, as represented in FIG. 7.

[0096] Once φ has been determined, the location of points on the curve C can be approximated by determining where the sign of the function φ changes sign, as represented in FIG. 8.

[0097] Using this level set approach for representations of curve, such curves can be compressed and stored. For instance, consider a curve C such as that shown in FIG. 9, which illustrates where φ as described above is positive, negative or zero within some box or image boundary 10 defined by a user or automatically generated in compliance with predefined criteria by a system according to the invention. In the present invention, φ can be approximated to an arbitrary degree of accuracy by polynomial interpolants within the box 10. Thus, FIG. 10 shows that box 5 may be subdivided, in this example into four equal, smaller boxes 10-40 (though other subdivisions, including unequal subdivisions, are possible). Each box 10-40 then contains a portion C1-C4, respectively, of the original curve C.

[0098] Box 40 is represented in FIG. 11, and a line segment L4 is represented, which is generated by connected the beginning point 50 and endpoint 60 of the curve as it passes through the box. If the curve passes into and out of the box multiple times, then the box may be further subdivided until the curve has only one beginning point and one endpoint within each smaller box or a single beginning point and endpoint may be selected for the error calculation (described below), which will itself results (as will be seen) in further subdivision of the box.

[0099] In this case, there is only one beginning point 50 and one endpoint 60 are present in box 40. Error regions 70 and 80 represent the total amount of area between the curve C4 and the line segment L4; this area is determined by adding the (absolute values of) the area differences between the line and the curve, in a conventional manner (which may often be carried out analytically, but at least may be accomplished numerically).

[0100] In the present invention, a predefined error is used to determine whether each line segment such as L4 is too far from its corresponding curve C4 to generate a compressed curve representation within a desired accuracy. This predefined error will be selected based upon particular needs of the application at hand, and thus its actual dimensions will also be application-specific.

[0101] If the total area between the line segment (here, L4) and the curve (C4) is larger than the predefined allowable error, then the box 40 is further subdivided as described above, such as into four smaller, equal-area boxes 90-120 (though, again, other subdivisions, including unequal subdivisions, are possible), as represented in FIG. 12. The line segment L4 is then replaced by the line segments L4.1, L4.2 and L4.3, corresponding to curve segments C4.1, C4.2 and C4.3, respectively, as shown in FIG. 13. The line segments L4.1-L4.3 are formed in a manner analogous to line segment L4 of FIG. 11.

[0102] Note that the curve segment C4 (and the curve C as a whole) does not cross box 90 in FIG. 13; in this case, any data relating to box 90 may be discarded, and need not be stored for an accurate representation of the compressed curve C.

[0103] In box 100, the error region E4.3 is fairly small, since the curve segment C4.3 is nearly a straight line in this box. In this case, it may be that the error is less than the predefined error, and this the information relating to the beginning point 130 and endpoint 140 are stored as the information representing the curve region C4.3. The approximation can, as mentioned, be made arbitrarily accurate by appropriate selection of the error values. Note that the error values at each lower level of box subdivision may generally be different (e.g. at finer levels of subdivisions, smaller error values may be used, such as in a ratio to the larger error values corresponding generally—or exactly equal—to the ratio of a given smaller box area to the corresponding larger box area for which an error has been defined). Such errors may be automatically generated or may be individually selected by a user, or some combination of both.

[0104] In boxes 110 and 120 of FIG. 13, it may be that the respective errors exceed the relevant predefined errors, in which case these boxes would be further subdivided, and the procedure described above iteratively repeated until the errors are within the desired ranged.

[0105] Note that other types of curve segments may be used instead of line segments. For instances, generalized curves such as circles, ellipses, parabolas or other conic sections, or curves represented by generalized polynomials, can be used as approximations to segments of the original curve to be represented, in which case the appropriate respective formulas for such generalized curves would be associated in each case with the respective curve segments. Such generalized curves can be selected by a user or automatically by a program, circuit or computer implementing the invention, so as to best approximate each curve segment in question and minimize the resultant error. This can lead to further savings of storage space or memory, since a large segment of the curve C might be able to be represented by a single formula (e.g. a parabolic section) rather than many smaller line segments, each with its own endpoints.

[0106] This method is carried out for the entire curve C, and the result is data files or other appropriate representation of the curve C, with each approximating segment stored in a manner such that an approximation of the original curve can be reconstructed and represented to the desired degree of accuracy. FIG. 14 represents the original curve C with the corresponding subdivided boxes as described above, each containing some segment of C and corresponding to some approximation of C for that segment.

[0107] The method can be carried out in an analogous manner for images of greater numbers of dimensions, e.g. for three-dimensional solids.

[0108]FIG. 15 is a block diagram of an appropriate hardware implementation incorporating the invention. A camera 200 or other image-forming device (CCD array, scanner, or analogous image digitizers) forms a binary or digitized image, represented by a file or data stream provided to a quantizer 210, which carries out the data quantization method described above. Quantizer 210, as well as any of the blocks appearing in FIG. 15, includes hardware, firmware, and/or software appropriate to implementing the appropriate portion(s) of the method of the invention.

[0109] The resulting data is provided as input to a curve compressor 220, which carries out the compression method described above. Encoder 230 then encodes the data into a predetermined format as needed, which is then stored in memory 240 and/or on some storage medium. Any minimum-redundancy encoder, or other encoder implementing a compression scheme (preferably but not necessarily lossless), would be suitable.

[0110] When the image is needed, the data file is retrieved from memory 240, and is provided to decoder 250, which converts the data into appropriate format for decompression. The converted data is provided as input to the ENO decompressor 260, where an approximation to the original curve is regenerated, and is provided to an output device 270, such as a display, a printer, or other device by which the resulting image can be viewed.

[0111] In the present invention, and thus in FIG. 15, the quantization and curve compression portions of the invention may be used independently of one another. Thus, a given image may be curve-compressed without using the data quantization represented by block 210 (and by the flow chart of FIG. 1), or alternatively the curve may be data-quantized without being curve-compressed. Optimal results are achieved by using both the data quantization and the curve compression procedures described above, e.g. very accurate images stored in a highly compressed form.

Appendix A: Quantization Pseudocode

[0112] Goal: Quantize data set values u[i][j] according to the measure A*(number of u[i][j])+sum TV[i][j], where TV[i][j]=total variation norm of u[i][j]

[0113] main( )

[0114] {

[0115] #Definitions

[0116] #input=input file array

[0117] #A=parameter used to balance the desired features, e.g. high contrast variance

[0118] #N=number of data values in the quantized set

[0119] #max_number_values=total number of possible data values

[0120] #size_x, size_y=sizes of the input array in the horizontal and vertical directions

[0121] #tvsequence=array for the u values and their corresponding TV values

[0122] #M_TV=measure for determining the histogram bin sizes

[0123] #S=histogram bin size

[0124] #dividepoints=u values corresponding to the histogram bins

[0125] //Open input file and return sizes

[0126] open(input_file, size_x, size_y);

[0127] //Allocate arrays according to the class Measure

[0128] input=new Measure [size_x];

[0129] tvsequence=new Measure[size_x];

[0130] M_TV=new Measure[size_x];

[0131] for (int i=0; i<sizex, i++){

[0132] input[i]=new Measure[size_y];

[0133] tvsequence[i]=new Measure[size_y];

[0134] M_TV[i]=new Measure[size_y];

[0135] }

[0136] //Set up input values of u

[0137] int k=0;

[0138] for (int i=0; i<size_x; i++){

[0139] for (int j=0; j<size_y; j++){

[0140] input.u[i][j]=input_file[k];

[0141] k++;

[0142] }

[0143] }

[0144] //Compute the values of M_TV

[0145] for (int i=0; i<size_x; i++){

[0146] for (int j=0; j<size_y; j++){

[0147] input.tv[i][j]=A+sqrt(pow(u[i+1][j]-u[i−1][j], 2)+pow(u[i][j+1]-u[i][j−1], 2));

[0148] }

[0149] }

[0150] //Define the sequence of u and tv values.

[0151] tvsequence.u[k]=monotone increasing range of input.u values

[0152] tvsequence.tv[k]=sum of all input.tv[i][j] values where input.u[i][j] is equal to tvsequence.u[k]

[0153] //Prepare the histogram values and bins. The midpoints of the bins will be the

[0154] //dividing points. First, sum up the tvsequence.tv values in a monotone

[0155] //increasing sequence.

[0156] M_TV.u=tvsequence.u;

[0157] M_TV.tv[0]=tvsequence.tv[0];

[0158] For (int k=1; k<max_number_values; k++){

[0159] M_TV.tv[k]=M_TV.tv[k−1]+tvsequence.tv[k];

[0160] }

[0161] //Determine the equal histogram bin sizes.

[0162] S=M_TV.tv[max_number_values -1]/(N−1);

[0163] //Determine the dividing points for the bins based on the bin sizes. The first and

[0164] //last bins are of size S/2, while the rest of the bins are of size S.

[0165] dividepoints[0]=M_TV.u[0];

[0166] k=0;

[0167] while(k!=max_number_values){

[0168] If (M_TV.tv[k]>S/2){

[0169] dividepoints[1]=M_TV.u[k];

[0170] }

[0171] }

[0172] int 1=2;

[0173] while(1!=N){

[0174] if (M_TV.tv[k]>S/2+(1−1)*S){

[0175] dividepoints[1]=M_TV.u[k];

[0176] 1++;

[0177] k++;

[0178] }

[0179] }

[0180] dividepoints[N]=M_TV.u[max_number_values]

[0181] //Reset the data values to the quantized data values. These quantized values

[0182] //are the midpoints of the interior bins, together with the first and last dividing

[0183] //points.

[0184] for (int i=0; i<size_x; i++){

[0185] for (int j=0; j<size_y; j++){

[0186] int 1=0;

[0187] do{

[0188] if (1==0){

[0189] if (input[i][j].u<=dividepoints[1]){

[0190] input[i][j].u=dividepoints[0];

[0191] }

[0192] }else if (1==N){

[0193] if (input[i][j].u>dividepoints[N−1]){

[0194] input[i][j].u=dividepoints[N];

[0195] }

[0196] }else{

[0197] if (input[i][j].u<=dividepoints[1+1])&&

[0198] (input[i][j].u>dividepoints[1]){

[0199] input[i][j].u=(dividepoints[1]+dividepoints[1+1])/2.;

[0200] }

[0201] }

[0202] 1++;

[0203] }while (1!=N+1);

[0204] //Output input.u to an output file.

[0205] }

Appendix B: Curve Compression Pseudocode

[0206] Goal: Compress curves using multiresolution representations of a level set function.

[0207] main( )

[0208] {

[0209] #Definitions

[0210] #C=original curve to be compressed

[0211] #phi=smooth function of size N−1 by N−1. The contour phi=0 is C.

[0212] #d1, d2, d3, d4=box coordinates

[0213] //Open the input file containing the curve to be compressed. Denote

[0214] //this curve data by the variable C.

[0215] //open(input_file,C);

[0216] //Compute the signed distance function, phi, to the curve C.

[0217] compute_distance(phi, C);

[0218] //Allocate enough space for the boxes. These boxes will contain piecewise

[0219] //polynomial approximations to phi. The first box is defined by the

[0220] //far corner grid values of phi.

[0221] d1=phi[0][0];

[0222] d2=phi[0][N−1];

[0223] d3=phi[N−1][0];

[0224] d4=phi[N−1][N−1];

[0225] //Initialize the first box and the box list.

[0226] Box firstbox(d1,d2,d3,d4);

[0227] comp_list.push_back(firstbox);

[0228] //Divide the initial square box until the error between phi and its interpolant

[0229] //in every kept box satisfies a tolerance criterion.

[0230] //Store relevant statistics of kept boxes.

[0231] dividing(phi,comp_list);

[0232] }

[0233] Subroutine: dividing

[0234] Dividing(phi,comp_list)

[0235] {

[0236] //Start at the beginning of the box list. Keep track of where you are

[0237] //on the list using the iterator it.

[0238] it=comp_list.begin( );

[0239] while (there are boxes left on list)

[0240] //Declare the current box

[0241] Box current_box(*it);

[0242] if (current box does not contain any part of curve)

[0243] go to the next box on the list.

[0244] else

[0245] approximate the error between the linear interpolant and phi

[0246] if (error<tolerance)

[0247] store the box corner values and width.

[0248] else

[0249] split the box into 4 new boxes.

[0250] add these new boxes to comp_list.

[0251] end

[0252] end

[0253] it++,

[0254] end

[0255] } 

What is claimed is:
 1. A method for quantizing an image, including the steps of: selecting a set of contour curves for the image; generating a representation of the image correlated with the contour curves and based upon at least one predetermined feature-oriented criterion of the image; and storing the generated representation of the image.
 2. The method of claim 1 , wherein the feature-oriented criterion includes area information relating to size of features of the image.
 3. The method of claim 2 , wherein the area information relates to a minimum predefined intensity level.
 4. The method of claim 1 , wherein the feature-oriented criterion is based upon a total variation measure of the image.
 5. The method of claim 1 , wherein the feature-oriented criterion is based at least in part on arc lengths of curves of the image.
 6. The method of claim 1 , wherein the feature-oriented criterion is based at least in part on areas of surfaces of the image.
 7. The method of claim 1 , wherein the feature-oriented criterion is based at least in part on curvature of level curves of the image.
 8. The method of claim 1 , wherein the feature-oriented criterion is based at least in part on curvature of surfaces of the image.
 9. The method of claim 1 , further including the step of compressing the generated representation of the image.
 10. The method of claim 9 , wherein the step of compressing includes generating a multiresolutional compressed representation of the image.
 11. A method for compressing an image, including the steps of: generating a zero-level contour representation of the image; and generating a multiresolution approximation to the zero-level contour representation.
 12. The method of claim 11 , further including the step of encoding the multiresolution approximation.
 13. The method of claim 11 , wherein the multiresolution approximation is a representation of a two-dimensional surface based upon a set of polygons.
 14. The method of claim 11 , wherein the multiresolution approximation is a representation of a three-dimensional solid based upon a set of polyhedra.
 15. A method for quantizing and compressing an image, including the steps of: selecting a set of contour curves for the image; generating a representation of the image correlated with the contour curves and based upon at least one predetermined feature-oriented criterion of the image; storing the generated representation of the image; generating a further representation of the stored image as a zero-level contour; and generating a multiresolution representation of the zero-level contour.
 16. An apparatus for quantizing an image in a processor-based system, including: a first module configured to select a set of contour curves for the image; a second module configured to generate a representation of the image correlated with the contour curves and based upon at least one predetermined feature-oriented criterion of the image; and a third module configured to the generated representation of the image.
 17. An apparatus for compressing an image in a processor-based system, including: a first module configured to generate a representation of the image as a zero-level contour; and a second module configured to generate a multiresolution representation of the zero-level contour.
 18. The apparatus of claim 18 , further including a third module configured to encode the multiresolution representation.
 19. An apparatus for quantizing and compressing an image, including: a first module configured to generate a set of contour curves for the image; a second module configured to generate a representation of the image correlated with the contour curves and based upon at least one predetermined feature-oriented criterion of the image; a third module configured to store the generated representation of the image; a fourth module configured to generate a further representation of the stored image as a zero-level contour; and a fifth module configured to generate a multiresolution representation of the zero-level contour.
 20. A method of decompressing and reconstructing an image, including the steps of: inputting data representing isocontours relating to the image into a processor-based system; and recovering the image from the isocontours data using at least one of an essentially nonoscillatory polynomial interpolation and a discrete approximation to Laplace's equation. 